package com.ikingtech.platform.service.system.country.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ikingtech.platform.service.system.country.entity.CountryDO;
import com.ikingtech.platform.service.system.country.mapper.CountryMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <a href="https://github.com/hlbj105/country-code">country-code</a>
 *
 * @author tie yan
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class CountryService extends ServiceImpl<CountryMapper, CountryDO> {

    public List<CountryDO> all() {
        return this.list(Wrappers.<CountryDO>lambdaQuery().orderByDesc(CountryDO::getCode));
    }
}
